/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.yourtrade.model;

import com.mycompany.yourtrade.common.BaseModel;
import lombok.Data;

/**
 *
 * @author xg
 */
@Data
public class ReturnResult extends BaseModel {

    public static final ReturnResult SUCCESS = new ReturnResult(true, "成功");

    private final boolean success;

    private final String message;

    public ReturnResult(boolean success,
                        String message) {
        this.success = success;
        this.message = message;
    }

    public static ReturnResult fail(String message) {
        return new ReturnResult(false, message);
    }
}
